1 //------------------------------------------------------------------------------
2 // <copyright file="iasm.cs" company="Microsoft">
4 // Copyright (c) 2006 Microsoft Corporation. All rights reserved.
6 // The use and distribution terms for this software are contained in the file
7 // named license.txt, which can be found in the root of this distribution.
8 // By using this software in any fashion, you are agreeing to be bound by the
9 // terms of this license.
11 // You must not remove this notice, or any other, from this software.
14 //------------------------------------------------------------------------------
19 using System
.Collections
;
20 using System
.Reflection
;
27 public const int I_INSN
= 101;
28 public const int I_LABEL
= 102;
29 public const int I_BRANCH
= 103;
30 public const int I_CALL
= 104;
31 public const int I_RET
= 105;
32 public const int I_INSN_STORE
= 111;
33 public const int I_INSN_LOAD
= 112;
34 public const int I_INSN_LOAD_CONST
= 113;
35 public const int I_COMMENT
= 120;
36 public const int I_FUNC_BEGIN
= 150;
37 public const int I_FUNC_END
= 151;
38 public const int I_FIELD
= 161;
39 public const int I_LOCALDEF
= 162;
43 private int itype
; /* type of instruction */
44 private String insn
; /* instruction */
45 private String label
; /* label name ref */
46 private Var ivar
; /* variable pointer */
47 private String comment
; /* comment buffer */
48 private int linenumber
; /* line number */
50 public void setNext(IAsm n
) { next = n; }
51 public IAsm
getNext() { return next; }
52 public void setICount(int i
) { icount = i; }
53 public int getICount() { return icount; }
54 public void setIType(int i
) { itype = i; }
55 public int getIType() { return itype; }
56 public void setInsn(String s
) { insn = s; }
57 public String
getInsn() { return insn; }
58 public void setLabel(String l
) { label = l; }
59 public String
getLabel() { return label; }
60 public void setVar(Var v
) { ivar = v; }
61 public Var
getVar() { return ivar; }
62 public void setComment(String c
) { if (comment
!= null) Io
.ICE("Comment overwrite");
64 public String
getComment() { return comment; }
65 public void setCommentLine(int l
) { linenumber = l; }
66 public int getCommentLine() { return linenumber; }